package org.jeecg.modules.business.transfer.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.business.transfer.entity.WmsMoveReceipt;
import org.jeecg.modules.business.transfer.entity.WmsMoveReceiptMaterial;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 移库单
 * @Author: jeecg-boot
 * @Date: 2023-08-11
 * @Version: V1.0
 */
public interface IWmsMoveReceiptService extends IService<WmsMoveReceipt> {

    /**
     * 添加一对多
     *
     * @param wmsMoveReceipt
     * @param wmsMoveReceiptMaterialList
     */
    public String saveMain(WmsMoveReceipt wmsMoveReceipt, List<WmsMoveReceiptMaterial> wmsMoveReceiptMaterialList);

    /**
     * 修改一对多
     *
     * @param wmsMoveReceipt
     * @param wmsMoveReceiptMaterialList
     */
    public void updateMain(WmsMoveReceipt wmsMoveReceipt, List<WmsMoveReceiptMaterial> wmsMoveReceiptMaterialList);

    /**
     * 删除一对多
     *
     * @param id
     */
    public void delMain(String id);

    /**
     * 批量删除一对多
     *
     * @param idList
     */
    public void delBatchMain(Collection<? extends Serializable> idList);

    /**
     * 移库提交
     *
     * @param id
     * @param req
     */
    void commit(String id,
                HttpServletRequest req);

    /**
     * 移库更新实时库存
     * @param id
     */
    void moveRepertory(String id);

    /**
     * 分页
     * @return
     */
    Page<WmsMoveReceipt> listByPage(Page<WmsMoveReceipt> page, WmsMoveReceipt moveReceipt);

}
